﻿
@{
    ViewData["Title"] = "Welcome";
}

<div class="weadmin-body">
    <blockquote class="layui-elem-quote">欢迎使用王爷管理系统！这里是首页。</blockquote>
</div>


@section Scripts{
    <script type="text/javascript">layui.extend({
			admin: '{/}../static/js/admin',
		});
		layui.use(['jquery', 'element','util', 'admin', 'carousel'], function() {
			var element = layui.element,
				$ = layui.jquery,
				carousel = layui.carousel,
				util = layui.util,
				admin = layui.admin;
			//建造实例
			carousel.render({
				elem: '.weadmin-shortcut'
				,width: '100%' //设置容器宽度
				,arrow: 'none' //始终显示箭头
				,trigger: 'hover'
				,autoplay:false
			});

			carousel.render({
				elem: '.weadmin-notice'
				,width: '100%' //设置容器宽度
				,arrow: 'none' //始终显示箭头
				,trigger: 'hover'
				,autoplay:true
			});

			$(function(){
				setTimeAgo(2018,0,1,13,14,0,'#firstTime');
				setTimeAgo(2019,5,20,16,0,0,'#lastTime');
			});
			function setTimeAgo(y, M, d, H, m, s,id){
			    var str = util.timeAgo(new Date(y, M||0, d||1, H||0, m||0, s||0));
			    $(id).html(str);
			    console.log(str);
			 };
		});</script>
}